import request from './request'

// 获取服务类型列表
export const getServiceTypes = () => {
  return request.get('/service-types')
}

// 获取服务列表
export const getServices = (params) => {
  return request.get('/services', { params })
}

// 获取单个服务
export const getService = (id) => {
  return request.get(`/services/${id}`)
}

// 创建服务
export const createService = (data) => {
  return request.post('/services', data)
}

// 更新服务
export const updateService = (id, data) => {
  return request.put(`/services/${id}`, data)
}

// 删除服务
export const deleteService = (id) => {
  return request.delete(`/services/${id}`)
}

